#include "RenderTexture.h"
#include "Exception.h"


NS_B2D_BEGIN

RenderTexture::RenderTexture(size_t texCount)
	: mTextureCount(texCount)
{

}

RenderTexture::~RenderTexture(void)
{
}

TexturePtr RenderTexture::getTexture(size_t index) const
{
	if( index < mTextureCount )
	{
		return mTextures[index];
	}
	else
	{
		B2D_THROW(Exception::INDEX_OUT_OF_RANGE_EXCEPTION,
			"Can not get texture from RenderTexture");
	}
}

NS_B2D_END